package com.test.models;

import com.test.utils.RouteUtils;

/**
 * Route
 * 
 * @author ezuccon
 * @category Models
 * @version 1.0
 * @since 12/03/2013
 */
public class Route {
	/**
	 * id
	 */
	private int id;

	/**
	 * from
	 */
	private City from;

	/**
	 * to
	 */
	private City to;

	/**
	 * distance
	 */
	private int distance;

	/**
	 * Constructor
	 */
	public Route() {
		super();
	}

	/**
	 * Constructor
	 * 
	 * @param idValue
	 * @param fromValue
	 * @param toValue
	 * @param distanceValue
	 */
	public Route(int idValue, City fromValue, City toValue, int distanceValue) {
		super();
		this.id = idValue;
		this.from = fromValue;
		this.to = toValue;
		this.distance = distanceValue;
	}

	/**
	 * @return the id
	 */
	public final int getId() {
		return id;
	}

	/**
	 * @param idValue
	 *            the id to set
	 */
	public final void setId(int idValue) {
		this.id = idValue;
	}

	/**
	 * @return the from
	 */
	public final City getFrom() {
		return from;
	}

	/**
	 * @param fromValue
	 *            the from to set
	 */
	public final void setFrom(City fromValue) {
		this.from = fromValue;
	}

	/**
	 * @return the to
	 */
	public final City getTo() {
		return to;
	}

	/**
	 * @param toValue
	 *            the to to set
	 */
	public final void setTo(City toValue) {
		this.to = toValue;
	}

	/**
	 * @return the distance
	 */
	public final int getDistance() {
		return distance;
	}

	/**
	 * @param distanceValue
	 *            the distance to set
	 */
	public final void setDistance(int distanceValue) {
		this.distance = distanceValue;
	}

	@Override
	public final String toString() {
		return (RouteUtils.getCityName(this.from)) + "-"
				+ (RouteUtils.getCityName(this.to));
	}
}
